import { BrowserModule } from '@angular/platform-browser';
import { NgModule } from '@angular/core';
import { RouterModule } from '@angular/router';
import { FormsModule, ReactiveFormsModule } from '@angular/forms';

import { FroalaEditorModule, FroalaViewModule } from 'angular-froala-wysiwyg';
import { NgZorroAntdModule } from 'ng-zorro-antd';

import { AppComponent } from './app.component';
import { EditNoteComponent } from './note/edit-note/edit-note.component';
import { AddNoteComponent } from './note/add-note/add-note.component';
import { NoteListComponent } from './note/note-list/note-list.component';
import { LoginComponent } from './login/login.component';
import { NavbarComponent } from './components/navbar/navbar.component';
import { IndexComponent } from './index/index.component';
import { NoteDetailComponent } from './note/note-detail/note-detail.component';

@NgModule({
  declarations: [
    AppComponent,
    EditNoteComponent,
    AddNoteComponent,
    NoteListComponent,
    LoginComponent,
    NavbarComponent,
    IndexComponent,
    NoteDetailComponent
  ],
  imports: [
    FormsModule,
    ReactiveFormsModule,
    BrowserModule,
    NgZorroAntdModule.forRoot(),
    FroalaEditorModule.forRoot(),
    FroalaViewModule.forRoot(),
    RouterModule.forRoot([{
        path: '',
        component: IndexComponent
      },
    {
      path: 'login',
      component: LoginComponent
    },
      {
        path: 'add-note',
        component: AddNoteComponent
      },{
        path: 'my-note',
        component: NoteListComponent
      },{
        path: 'note-detail',
        component: NoteDetailComponent
      }])
  ],
  providers: [],
  bootstrap: [AppComponent]
})
export class AppModule { }
